<a style="margin-bottom:6px;white-space: normal;" rel="tooltip" title="<%= translation('sidebar._post_button.share_your_work',{},false) %>" data-placement="bottom" href="/post" class="btn btn-primary btn-lg btn-block d-lg-none d-xl-block"><i class="fa fa-pencil fa-white"></i> <%= translation('sidebar._post_button.write_research_note') %></a>
<div class="btn-group d-none d-lg-block d-xl-none" style="margin-bottom:6px;">
  <a rel="tooltip" title="Share your work with others" data-placement="bottom" href="/post" class="btn btn-primary btn-lg"><i class="fa fa-pencil fa fa-white"></i> <%= translation('sidebar._post_button.post_research') %></a>

  <div class="dropdown">
    <a class="btn btn-primary btn-lg dropdown-toggle" data-toggle="dropdown" href="#"><span class="caret"></span></button>

    <div class="dropdown-menu">
      <a class="dropdown-item" href="/post"><i class="fa fa-pencil"></i> <b><%= translation('sidebar._post_button.post_research_note') %></b></a>
      <a class="dropdown-item" href="/wiki/new"><i class="fa fa-book"></i> <%= translation('sidebar._post_button.create_wiki_page') %></a>
      <div class="dropdown-divider"></div>
      <a class="dropdown-item" href="/wiki/about-posting" class="hidden-lg"><i class="fa fa-question-sign"></i> <%= translation('sidebar._post_button.about_posting') %></a>
      <% if logged_in_as(['admin', 'moderator']) %>
        <a class="dropdown-item" href="/spam"><i class="fa fa-ban-circle"></i> <%= translation('sidebar._post_button.moderate_spam') %></a>
        <a class="dropdown-item" href="/useremail"><i class="fa fa-search"></i> <%= translation('sidebar._post_button.email_search') %></a>
      <% end %>
    </div>
  </div>

</div>

<% if logged_in_as(['admin', 'moderator']) %>
<div class="btn-group" style="margin-left:0;margin-top:6px;">
  <a href="#" data-toggle="dropdown" class="btn btn-default dropdown-toggle"><i class="fa fa-wrench"></i> <%= translation('sidebar._post_button.tools') %> <span class="caret"></span></a>
  <ul class="dropdown-menu">
    <% if logged_in_as(['admin', 'moderator']) %>
      <li><a href="/spam"><i class="fa fa-ban-circle"></i> <%= translation('sidebar._post_button.moderate_spam') %></a></li>
      <li><a href="/useremail"><i class="fa fa-search"></i> <%= translation('sidebar._post_button.email_search') %></a></li>
    <% elsif logged_in_as(['admin']) %>
      <li><a href="/post?newsletter=true"><i class="fa fa-bullhorn"></i> <%= translation('sidebar._post_button.post_newsletter') %></a></li>
    <% end %>
  </ul>
</div>
<% end %>
<p style="clear:both;padding-top:10px;margin-bottom:4px;"><a href="/wiki"><i class="fa fa-book"></i> <%= translation('sidebar._post_button.browse_wiki') %> &raquo;</a></p>
<hr style="margin-bottom:20px;"/>
